package com.snail.cloud.exp;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * 全局异常处理类
 *
 * @author snail
 * @date 2024/9/23
 */
@Slf4j
@RestControllerAdvice
public class GlobalExceptionHandler {

    // @ExceptionHandler(RuntimeException.class)
    // @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
    // public ResultData<String> exception(Exception e) {
    //     // 处理异常
    //     log.error("全局异常信息", e, e.getMessage());
    //     return ResultData.fail(ReturnCodeEnum.RC500.getCode(), e.getMessage());
    // }
}
